<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
<h:head>
	<title>nested consult</title>
	<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
	<style> 
		.ui-widget,        
		.ui-widget .ui-widget { font-size: 90% !important;} 
	</style>
</h:head>
<h:body>

<h:form>
    
     
    	<p:megaMenu>
			<p:menuitem value="Главная" url="http://localhost:8080/nesteDDevelopment/main.jsf" icon="ui-icon-document" />
			<p:menuitem value="Участники" url="http://localhost:8080/nesteDDevelopment/users.jsf" icon="ui-icon-pencil" />
			<p:menuitem value="Дистрибьюторы" url="http://localhost:8080/nesteDDevelopment/distrs.jsf" icon="ui-icon-contact" />
			<p:menuitem value="Процессы" url="http://localhost:8080/nesteDDevelopment/processes.jsf" icon="ui-icon-contact" />
		</p:megaMenu>
		
		<p:dataTable id="tbl" 
			var="req" 
			value="#{requestsBean.requestsTest}" 
			paginator="true" 
			rows="50" 
			selection="#{requestsBean.selectedRequest}"
			selectionMode="single">

		<p:ajax event="rowSelect" listener="#{requestsBean.onRowSelect}" />
		
        <p:column>
        	<f:facet name = "header">
        		<h:outputText value="Наименование"/>
            </f:facet>
            <h:outputText value="#{req.name}" />
        </p:column>

        <p:column>
        	<f:facet name="header">
        		<h:outputText value="Заказчик"/>
        	</f:facet>
            <h:outputText value="#{req.customerFullname}" />
        </p:column>
        
        <p:column>
        	<f:facet name="header">
        		<h:outputText value="Подержка"/>
        	</f:facet>
            <h:outputText value="#{req.support}" />
        </p:column>
        
        <p:column>
        	<f:facet name="header">
        		<h:outputText value="Дата создания"/>
        	</f:facet>
            <h:outputText value="#{req.createDateText}" />
        </p:column>
        
        <p:column>
        	<f:facet name="header">
        		<h:outputText value="Срок"/>
        	</f:facet>
            <h:outputText value="#{req.endDateText}" />
        </p:column>
        
    </p:dataTable>
    
  				
</h:form>
</h:body></html>